home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)t8.d64
/
spell.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
4KB
|
164 lines
5 REM THIS PROGRAM WILL READ AND WRITE
6 REM TO A DISK, SO YOU MUST MAKE SURE
7 REM YOU KEEP ONE IN YOUR DRIVE.
8 REM WHEN YOU TYPE IN A NEW LIST, IT
9 REM IS WRITTEN TO THE DISK AS FILE
10 REM "[211][208][197][204][204]1.MM/DD", WHERE MM IS THE
11 REM MONTH AND DD IS THE DAY.
12 REM
14 REM THIS DISK CONTAINS ONE SAMPLE
15 REM FILE OF THREE WORDS. WHEN ASKED
16 REM FOR THE MONTH TYPE IN "1"; FOR
17 REM THE MONTH TYPE IN "15"
18 REM
80 POKE 53272,PEEK(53272)OR2
90 DIM W$(30),D$(30),ER(30)
100 PRINT "[147][215]ELCOME TO [210]ICHIE'S [211][208][197][204][204][205][193][211][212][197][210]-64"
110 PRINT "[217]OU MAY EITHER ENTER A NEW LIST OF"
120 PRINT "WORDS OR YOU MAY REVIEW AN OLD LIST."
130 PRINT
140 PRINT "[211]ELECT YOUR CHOICE.: "
150 PRINT
160 PRINT SPC(10);"F1[146] [210]EVIEW OLD LESSON"
170 PRINT SPC(10);"F3[146] [197]NTER NEW LESSON"
175 PRINT SPC(10);"F7[146] [209]UIT"
180 GET A$: IF A$="" GOTO 180
185 IF ASC(A$)=136 THEN STOP
190 IF ASC(A$)=133 GOTO 3000
200 IF ASC(A$)<>134 GOTO 180
300 REM
310 REM ENTER NEW WORDS
320 J=0
350 PRINT "[147] [197]NTER WORD OR PRESS '[210][197][212][213][210][206]'"
360 PRINT "[215]ORD NUMBER";J+1;:INPUT W$(J)
365 IF LEN(W$(J))=0 THEN J=J-1:GOTO 460
370 PRINT "[147][197]NTER WORD AGAIN TO VERIFY"
380 INPUT C$
390 IF W$(J)=C$ GOTO 450
400 PRINT "[217]OU DIDN'T SPELL IT THE SAME WAY"
405 PRINT "BOTH TIMES. [212]RY AGAIN.
410 [141] 11000: [137] 350
450 [141] 11200:J[178]J[170]1: [137] 350
460 [139] J[178][171]1 [137] 100
465 [153] "LOAD(null)HAT IS TODAY'S DATE?"
470 [153]
480 [133] "(null)ONTH ((null)(null)(null)PEEKVAL(null) PLEASE):";M$
490 A$[178]M$: [141] 11100
500 [139] F[178]0 [137] 520
510 [153] "(null)OU MUST ENTER A (null)(null)(null)PEEKVAL(null)": [137] 480
520 M[178][197](M$): [139] M[177]0 [175] M[179]13 [137] 540
530 [153] "(null)ONTH NUMBER MUST BE BETWEEN 1-12": [137] 480
540 [133] "STR$AY ((null)(null)(null)PEEKVAL(null) PLEASE) ";DA$
550 A$[178]DA$: [141] 11100
560 [139] F[178]0 [137] 580
570 [153] "(null)OU MUST ENTER A (null)(null)(null)PEEKVAL(null)": [137] 540
580 M[178][197](DA$): [139] M[177]0 [175] M[179]32 [137] 600
590 [153] "STR$AY NUMBER MUST BE BETWEEN 1-31": [137] 540
600 [159] 3,8,3,"0:SPELL1."[170]M$[170]"/"[170]DA$[170]",S,W"
605 NW[178]J : CR$[178][199](13)
610 [152]3,J
620 [129] JJ[178]0[164]J
630 [152]3,1;CR$;W$(JJ);CR$;D$(JJ)
635 ER(JJ)[178]1
640 [130]
650 [160] 3
940 [143]
950 [143]
1000 [153] [166]7);"F1WAIT CHR$ET CLUES"
1015 [153] [166]7);"F5WAIT VALNTER/(null)ETRIEVE ANOTHER LESSON"
1018 [153] [166]7);"F7WAIT (null)UIT"
1020 [153]
1030 [161] A$:[139]A$[178]"" [137] 1030
1040 [139] [198](A$)[178]133 [137] 2000
1050 [139] [198](A$)[178]134 [137] 2000
1060 [139] [198](A$)[178]135 [137] 130
1065 [139] [198](A$)[178]136 [167] [144]
1070 [137] 1000
1080 [143]
1090 [143] ROUTINE TO CONTINUE ACTION
1998 [143]
2000 KK[178]0
2001 [129] K[178]0[164]J
2002 [139] ER(K)[178]0 [137] 2190
2010 TR[178]1: KK[178]KK[170]1
2015 [153] "LOAD (null)ORD NUMBER";KK:[153]
2020 [153] [166]10);"LEFT$ERE IS THE CLUE:": [153]
2060 [153] "";D$(K);"WAIT"
2070 [153]
2080 [133] "(null)YPE IN THE WORD ";S$
2090 [139] S$[178]W$(K) [137] 2180
2100 [139] TR[177]1 [137] 2130
2110 [153] "(null)O, THAT'S NOT CORRECT. (null)RY AGAIN."
2120 TR[178]TR[170]1:[137] 2080
2130 [139] TR[177]2 [137] 2170
2140 [153] "(null)(null), LEFT$ERE ARE THE FIRST 2 LETTERS."
2145 [153] "(null)RY AGAIN!"
2150 [153] [202](W$(K),1,2)
2160 TR[178]TR[170]1:[137] 2080
2170 [153] "(null)O, THE WORD WAS ";W$(K):[141] 11000: [137] 2190
2180 [153] "CHR$(null)(null)STR$! (null)HAT'S CORRECT.":[141] 11000
2185 [139] TR[178]1 [167] ER(K)[178]0
2190 [130]
2195 [137] 4000
2200 [137] 130
3000 [153] "LOADVALNTER THE DATE FOR THE LESSON"
3010 [153]
3020 [133] "VALNTER MONTH (null)(null)(null)PEEKVAL(null) :";M$
3030 [133] "VALNTER DAY (null)(null)(null)PEEKVAL(null) :";DA$
3040 [159] 3,8,3,"0:SPELL1."[170]M$[170]"/"[170]DA$[170]",S,R" : [141] 11500
3042 [160] 3
3044 [159] 3,8,3,"0:SPELL1."[170]M$[170]"/"[170]DA$[170]",S,R"
3060 [132]3,J
3070 NE[178]0: NW[178]J
3080 [129] K[178]0[164]J
3090 [132]3,ER(K),W$(K),D$(K)
3095 [139] ER(K)[178]O [167] NE[178]NE[170]1
3100 [130]
3110 [160] 3:[153]
3120 [139] NE[178]J[170]1 [137] 3200
3130 [153] "(null)AST TIME YOU MISSED ";J[170]1[171]NE;" WORDS IN THIS LESSON. ";
3140 [153] "LEFT$ERE THEY ARE FOR YOUR REVIEW.": [141] 11000: [137] 1000
3200 [129] K[178]0 [164] J
3210 ER(K)[178]1: [130]
3215 [153]: [153] "(null)HERE ARE ";J[170]1;" WORDS IN THIS LESSSON.":[153]
3220 [153] "(null)AST TIME YOU GOT THEM ALL RIGHT.": [141] 11000: [137] 1000
3998 [143]
3999 [143] RE-WRITE FILE TO DISK
4000 [159] 3,8,3,"@0:SPELL1."[170]M$[170]"/"[170]DA$[170]",S,W"
4005 [153]:[153] [166]10);"(null)(null)STR$ATN(null)RIGHT$(null)CHR$CLOSEASCRIGHT$(null)VAL"
4010 [152]3, NW : CR$[178][199](13):CT[178]0
4020 [129] K[178]0 [164] NW
4030 [152]3,ER(K);CR$;W$(K);CR$;D$(K)
4035 [139] ER(K)[178]0 [167] CT[178]CT[170]1
4040 [130]: [160] 3
4045 [153]:[153]" (null)OU GOT";CT;"OUT OF";NW[170]1;"CORRECT.
4050 GOTO 130
11000 PRINT "[208]RESS F7 TO CONTINUE"
11010 GET R$: IF R$="" GOTO 11010
11020 IF ASC(R$)=136 THEN RETURN
11030 GOTO 11010
11098 REM
11100 L=LEN(A$)
11110 F=0
11120 FOR JJ=1TOL
11130 C$=MID$(A$,JJ,1)
11140 IF ASC(C$)<48 OR ASC(C$)>57 THEN F=1: RETURN
11150 NEXT JJ
11160 RETURN
11198 REM
11200 PRINT "[147][212]YPE IN A DEFINITION FOR THIS WORD"
11210 INPUT D$(J)
11220 PRINT "[201]S THIS CORRECT?"
11230 PRINT: PRINT D$(J)
11240 PRINT SPC(10); "F1[146] [217][197][211]"
11250 PRINT SPC(10); "F3[146] [206][207]"
11260 GET A$: IF A$="" GOTO 11260
11270 IF ASC(A$)=133 THEN RETURN
11280 GOTO 11200
11500 OPEN 15,8,15
11510 INPUT#15,E,B$,C$,G$
11520 IF E=0 THEN CLOSE 3:CLOSE 15:RETURN
11530 PRINT:PRINT E,B$,C$,G$
11535 CLOSE 15
11540 STOP